import request from '@/utils/request'

// 修改会员信息
export function ApiUpdateBase(data) {
  return request({
    url: '/member/member/updateBase',
    method: 'post',
    data
  })
}
//找回密码
export function memberforgetP(data) {
  return request({
    url: '/member/member/forgetP',
    method: 'post',
    data
  })
}
// 修改邮箱
export function ApiUpdateEmail(data) {
  return request({
    url: '/member/member/updateEmail',
    method: 'post',
    data
  })
}

// 修改登录密码
export function ApiUpdatePassword(data) {
  return request({
    url: '/member/member/updateP',
    method: 'post',
    data
  })


}
//修改资金密码
export function walletUpdateP(data) {
  return request({
    url: '/member/wallet/resetAssetPwd',
    method: 'post',
    data
  })
}

// 验证资金密码
export function ApiVerifyFundPassword(data) {
  return request({
    url: '/member/wallet/checkP',
    method: 'post',
    data
  })
}
// 查询收货地址
export function ApiAddressList(data) {
  return request({
    url: '/member/address/list',
    method: 'post',
    data
  })
}
// 新增收货地址
export function ApiAddressAdd(data) {
  return request({
    url: '/member/address/add',
    method: 'post',
    data
  })
}
// 修改收货地址
export function ApiAddressUpdate(data) {
  return request({
    url: '/member/address/update',
    method: 'post',
    data
  })
}
// 删除收货地址
export function ApiAddressDelete(data) {
  return request({
    url: `/member/address/del/${data}`,
    method: 'post',
    data
  })
}
// 查询收货地址详情
export function ApiAddressDetail(id) {
  return request({
    url: `/member/address/info/${id}`,
    method: 'get'
  })
}

// 查询默认收货地址
export function ApiAddressDefault(params) {
  return request({
    url: '/member/address/default',
    method: 'get',
    params
  })
}
// 设置默认收货地址
export function ApiAddressDefaultSet(data) {
  return request({
    url: '/member/address/default',
    method: 'post',
    data
  })
}
